package model

import (
	"time"
)

type Rule struct{
	RuleId int `xorm:"pk autoincr"`
	OrderType int
	OrderTypeName string
	State int
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (r *Rule)QueryRuleByOrderType(otId int) []*Rule{
	var rvList []*Rule
	x.Where("order_type = ?", otId).And("state = ?", 1).Find(&rvList)
	return rvList
}